using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using System.Drawing.Imaging;
using PlugIn;

namespace MyOp
{
    public class MyOp : IPlugin
    {
        private string m_strName;
        private IPluginHost m_Host;

        public MyOp()
        {
            m_strName = "TurnBlack";
        }



        public string Name
        { get { return m_strName; } set { m_strName = value; } }

        public Bitmap Do(Bitmap pic, List<Mylabel> labelsList, string selectedLabText)
        {
            foreach (Mylabel ml in labelsList)
            {
                if (ml.name.Equals(selectedLabText))
                {

                    foreach (Mypoint mp in ml.pixels)
                    {
                        pic.SetPixel(mp.x, mp.y, Color.Black);
                    }
                }
            }
            return pic;

        }

        public IPluginHost Host
        {
            get { return m_Host; }
            set
            {
                m_Host = value;
                m_Host.Register(this);
            }
        }
    }

}
